Conversation
lib/internal/fs.js
Outdated
There was a problem hiding this comment.
Shouldn't these be TypeErrors?
|
|
refack
left a comment
There was a problem hiding this comment.
Good, but needs a few tweaks
There was a problem hiding this comment.
{type} should be added.
{message} would be nice.
lib/internal/util.js
Outdated
There was a problem hiding this comment.
The other way around (rename the formal parameter) - https://nodejs.org/api/util.html#util_util_promisify_original
lib/internal/fs.js
Outdated
|
Comments addressed |
|
Better, but all |
e57cc6e to
904ad1b
Compare
|
Addressed and rebased |
|
Just found #11317. |
|
@refack I tried to find a duplicate and I didn't find that one... I am fine to remove the overlapping changes here. I guess that would be best? |
|
Oh, #11317 was closed when I was looking for it. That's why I couldn't find it 😃 |
I don't think flags need a special error code. |
Yep. |
lib/internal/child_process.js
Outdated
There was a problem hiding this comment.
nit: these need to be lined up.
lib/internal/util.js
Outdated
There was a problem hiding this comment.
this change looks entirely unrelated to the internal/errors change... it should likely be in it's own PR
There was a problem hiding this comment.
I think it is pretty much a leftover of a former change. I'll remove it again
There was a problem hiding this comment.
should go ahead and include the message here too
lib/internal/fs.js
Outdated
There was a problem hiding this comment.
Having a specific ERR_UNKNOWN_ENCODING error would be better here.
There was a problem hiding this comment.
I believe this and the flags assertion are superseded by #11317
(Where I made the opposite argument 😉 #11317 (comment) )
There was a problem hiding this comment.
I think I agree that sticking to the generic one makes sense, but open discussion on the merits of a more specific one.
test/parallel/test-fs-open-flags.js
Outdated
There was a problem hiding this comment.
A more specific error here would likely be better.
ERR_FS_UNKNOWN_FILE_OPEN_FLAG or something similar
|
@BridgeAR now that the other PRs landed, could you rework & rebase. Probably could use the new |
904ad1b to
9949174
Compare
|
Rebased |
9949174 to
16db827
Compare
|
Rebased. PTAL |
|
Re: #13937 (comment) @nodejs/ctc |
|
Can you rebase? This is conflicting with master. |
In addition refactor common.throws to common.expectsError
16db827 to
44d655e
Compare
|
There is not much left of this after a couple of rebases as there were other PRs that got merged that did the same thing. This is happening very frequently with the internal/errors and I am wondering how it's possible to prevent these duplicates a bit better. I actually stopped opening PRs with ports because of that. I squashed the commits as they individually did not change a lot anymore. |
In addition refactor common.throws to common.expectsError PR-URL: nodejs#13829 Refs: nodejs#11273 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
Landed in 095357e |
Ref: #11273
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
internal